<div class="page-wrapper d-flex flex-column pt-4 w-100">
    <div class="container-xl">
        <div class="page-header d-print-none">
            <div class="row align-items-center">
                <div class="col">
                    <div class="page-pretitle">
                        Creating
                    </div>
                    <h3 class="page-title">
                        New Setting
                    </h3>
                </div>
            </div>
        </div>
    </div>
    <div class="page-body d-flex flex-row-reverse">

        <aside class="bd-sidebar sub-sidebar">
            <nav class="bd-links p-3" aria-label="Sub-section navigation">
                <div class="card">

                    <actions preview-url="viewmodel.fullPath" back-url="'/portal/configuration/list'">
                    </actions>
                </div>
            </nav>
        </aside>


        <!-- ----------------------------------------------------------- -->


        <div class="content-body py-3 pe-3">
            <!-- Main content -->
            <div class="card">
                <div class="card-body">

                    <section class="" ng-init="getSingle()">
                        <form ng-if="viewmodel" ng-class="{'submitted': submitted}" ng-submit="save()">
                            <div class="mb-3" ng-if="isAdmin">
                                <label class="form-label">Keyword</label>
                                <input type="text" required class="form-control form-control-lg"
                                    ng-model="viewmodel.keyword">
                            </div>
                            <div class="row">
                                <div class="col">
                                    <div class="mb-3" ng-if="isAdmin">
                                        <label class="form-label">Category</label>
                                        <select class="form-select" ng-model="viewmodel.category">
                                            <option ng-repeat="item in cates" ng-value="item">{{item}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col">
                                    <div class="mb-3" ng-if="isAdmin">
                                        <label class="form-label">Type</label>
                                        <mix-select model="viewmodel.property.dataType"
                                            options="globalSettings.dataTypes" callback="initEditors(type)">
                                        </mix-select>
                                    </div>
                                </div>
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Value</label>
                                <module-form-editor ng-if="viewmodel" data="viewmodel.property"
                                    column-title="viewmodel.title" input-class="me-2"></module-form-editor>
                            </div>
                            <div class="mb-3" ng-if="isAdmin">
                                <label class="form-label">Description</label>
                                <textarea type="text" class="form-control" ng-model="viewmodel.description"></textarea>
                            </div>
                        </form>
                    </section>
                </div>
            </div>
            <!-- /.content -->
        </div>

    </div>